<?php

namespace App\Http\Requests;


use Dingo\Api\Http\FormRequest;

class BindPhoneRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
//            |unique:wxuser
            'telephone' => 'required|regex:/^1[3456789]\d{9}$/',
        ];
    }

    public function messages()
    {
        return [
            'telephone.required'=>'手机号不能为空',
            'telephone.regex' =>'手机号格式错误',
        ];
    }
}
